import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

import 'provider/delivery_provider.dart';
import 'widget/delivery_fee_browser.dart';

@RouterConfig(DeliveryFeeSettingPage.pageName)
class DeliveryFeeSettingPage extends StatefulWidget {
  static const pageName = '/deliveryFeeSettingPage';

  @override
  _DeliveryFeeSettingPageState createState() => _DeliveryFeeSettingPageState('配送费用设置');
}

class _DeliveryFeeSettingPageState extends BaseState<DeliveryFeeSettingPage> {
  _DeliveryFeeSettingPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (context) => DeliveryProvider(),
      child: Scaffold(
        appBar: CenterTitleAppBar(
          title: '配送费用设置',
        ),
        body: DeliveryFeeBrowser(),
      ),
    );
  }
}
